package com.example.backdemo.controller;

import com.example.backdemo.service.CustomInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@CrossOrigin
public class CustInfoController {
    @Autowired
    private CustomInfoService customInfoService;

    @GetMapping("/getAge")
    public Map<String, Integer> getAge() {
        return customInfoService.getAge();
    }

    @GetMapping("/getGrade")
    public Map<String, Integer> getGrade() {
        return customInfoService.getGrade();
    }

    @GetMapping("/getSex")
    public Map<String, Integer> getSex() {
        return customInfoService.getSex();
    }

    @GetMapping("getJob")
    public Map<String, Integer> getJob() {
        return customInfoService.getJob();
    }

    @GetMapping("/getTotal")
    public Integer getTotal() {
        return customInfoService.getTotal();
    }

    @GetMapping("/getFlag1")
    public Map<String,Integer> getFlag1() {
        return customInfoService.getFlag1();
    }

    @GetMapping("/getFlag2")
    public Map<String,Integer> getFlag2() {
        return customInfoService.getFlag2();
    }

    @GetMapping("/getFlag3")
    public Map<String,Integer> getFlag3() {
        return customInfoService.getFlag3();
    }


}
